

const express = require('express')
const router = express.Router()

// const sql = require('../db/index')

let menusList = [
  {
    id: 1,
    name: 'dashboard',
    icon: 'icon',
    num: '1',
    route: "/admin/dashboard",
    type: 'menu',
    status: '显示'
  },
  {
    id: 2,
    name: '栏目管理',
    icon: "icon_6",
    num: '2',
    route: "/admin/category",
    type: 'menu',
    status: '显示'  // 或者隐藏
  },
  {
    id: 3,
    name: '产品管理',
    icon: "icon_16",
    num: '3',
    route: "/admin/product",
    type: 'menu',
    status: '显示'
  },
  {
    id: 4,
    name: '账单管理',
    icon: "icon_14",
    num: '4',
    route: "/admin/account",
    type: 'menu',
    status: '显示',
    children: [
      {
        id: 5,
        name: '顾客账单',
        num: '5',
        route: "/admin/account/custome",
        type: 'menu',
        status: '显示'
      },
      {
        id: 6,
        name: '员工账单',
        num: '6',
        route: "/admin/account/employee",
        type: 'menu',
        status: '显示'
      }
    ]
  },
  {
    id: 7,
    name: "订单管理",
    num: '7',
    icon: 'icon_10',
    route: "/admin/ordermanager",
    type: 'menu',
    status: '显示'
  },
  {
    id: 8,
    name: "审核大厅",
    num: '8',
    icon: 'icon_13',
    route: "/admin/check",
    type: 'menu',
    status: '显示',
    children: [
      {
        id: 9,
        name: '实名认证',
        num: '9',
        route: "/admin/check/certification",
        type: 'menu',
        status: '显示'
      },
      {
        id: 10,
        name: '账户变更',
        num: '10',
        route: "/admin/check/accountApply",
        type: 'menu',
        status: '显示'
      },
      {
        id: 11,
        name: '资讯评论',
        num: '11',
        route: "/admin/check/infoComment",
        type: 'menu',
        status: '显示'
      },
      {
        id: 12,
        name: '订单评论',
        num: '12',
        route: "/admin/check/orderComment",
        type: 'menu',
        status: '显示'
      }
    ]
  },
  {
    id: 13,
    name: '顾客管理',
    num: '13',
    icon: 'icon_9',
    route: '/admin/custome',
    type: 'menu',
    status: '显示'
  },
  {
    id: 14,
    name: '员工管理',
    num: '14',
    icon: 'icon_4',
    route: '/admin/waiter',
    type: 'menu',
    status: '显示'
  },
  {
    id: 15,
    name: '网站资讯',
    num: '15',
    icon: 'icon_1',
    route: '/admin/info',
    type: 'menu',
    status: '显示',
    children: [
      {
        id: 16,
        name: '资讯信息',
        num: '16',
        route: '/admin/info/list',
        type: 'menu',
        status: '显示'
      },
      {
        id: 17,
        name: '资讯详情',
        num: '17',
        route: '/admin/info/details',
        type: 'menu',
        status: '显示'
      },
      {
        id: 18,
        name: '发布资讯',
        num: '18',
        route: '/admin/info/publish',
        type: 'menu',
        status: '显示'
      },
      {
        id: 19,
        name: '资讯分类',
        num: '19',
        route: '/admin/info/category',
        type: 'menu',
        status: '显示'
      },
    ]
  },
  {
    id: 20,
    name: '角色权限',
    num: '20',
    icon: 'icon_2',
    route: '/admin/sys',
    type: 'menu',
    status: '显示',
    children: [
      {
        id: 21,
        name: '用户管理',
        num: '21',
        route: '/admin/sys/user',
        type: 'menu',
        status: '显示'
      },
      {
        id: 22,
        name: '用户详情',
        num: '22',
        route: '/admin/sys/userDetails',
        type: 'menu',
        status: '显示'
      },
      {
        id: 23,
        name: '角色管理',
        num: '23',
        route: '/admin/sys/role',
        type: 'menu',
        status: '显示'
      },
      {
        id: 24,
        name: '权限管理',
        num: '24',
        route: '/admin/sys/privilege',
        type: 'menu',
        status: '显示'
      },
    ]
  },
  {
    id: 25,
    name: '轮播管理',
    num: '25',
    icon: 'icon_8',
    route: '/admin/carousel',
    type: 'menu',
    status: '显示',
  },
  {
    id: 26,
    name: '日志管理',
    num: '26',
    icon: 'icon_17',
    route: '/admin/log',
    type: 'menu',
    status: '显示'
  },
  {
    id: 27,
    name: '系统配置',
    num: '27',
    icon: 'icon_5',
    route: '/admin/baseConfig',
    type: 'menu',
    status: '显示'
  },
  {
    id: 28,
    name: '个人信息',
    num: '28',
    icon: 'icon_3',
    route: '/admin/ownerIndex',
    type: 'menu',
    status: '显示'
  }
]
// 获取菜单列表
router.get('/list', async (req, res) => {
  res.send({
    code: 200,
    msg: '获取菜单列表成功',
    data: menusList
  })
})


module.exports = router